We want to ask the user which transition word they want to use to help move the story along. In this story, we want to transition to what is going to happen next, so we'll ask for a transition from the sequence category.
Go to and drag out Ask.
Change the word choice to transition1. This will store the value that the user enters so we can use it later.
Change the string to "Choose a transition from the sequence category."
To navigate the page using the TAB key, first press ESC to exit the code editor.
stage.set_background("park")
sprite = codesters.Sprite("person3")
sprite.glide_to(-100, 50)
# text = codesters.Text("text", x, y, "color")
text = codesters.Text("I went to the park!", 0, -200, "blue")
stage.wait(1)
sprite.move_right(400)
t = codesters.Teacher()
try:
tval1 = t.find_function('ask')[0][1]
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success('transition1' in tval1 and 'choose' in tval1.lower(), "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add an Ask command?")
t1.add_failure('choice' in tval1, "Did you change the variable name choice to transition1?")
t1.add_failure('yes' in tval1.lower(), "Did you change the string in your ask so that the user chooses a transition?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.